<template>
	<view>
		<!-- 导航栏 -->
		<cu-custom bgColor="bg-white" class="nav-bar" :isBack="true">
			<block slot="content">我的矿机</block>
		</cu-custom>
		<scroll-view scroll-x class="bg-green-two nav">
			<view class="flex text-center">
				<view class="cu-item flex-sub" :class="index==TabCur?'text-blue':''" v-for="(item,index) in tabList" :key="index" @tap="tabSelect" :data-id="index">
					{{item}}
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				TabCur: 0,
				scrollLeft: 0,
				tabList:[
					'正在运行',
					'已结束'
				]
			}
		},
		methods: {
			tabSelect(e) {
				this.TabCur = e.currentTarget.dataset.id;
				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
			}
		}
	}
</script>

<style>

</style>
